/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package listmap;

import java.util.Comparator;





/**
 *
 * @author Bartek
 */
public class PorownajCeny  implements Comparator<Towar>{

    @Override
    public int compare(Towar o1, Towar o2) {
        double r = o1.cena_-o2.cena_;
        if(r<0){
            return -1;
        }else if(r>0){
            return 1;
        }
        return 0;
    }
    
   
}
